from django.core.management.base import BaseCommand

from gis.common import track_logging
from itpay.core.agency import receipt_service

_LOGGER = track_logging.getLogger(__name__)


class Command(BaseCommand):
    def handle(self, *args, **options):
        _LOGGER.info("begin execute clear daily receipt address amount")
        try:
            receipt_service.clear_all_receipt_daily_amount()
        except:
            _LOGGER.exception("fail execute clear daily receipt address amount")
        _LOGGER.info("finish execute clear daily receipt address amount")
